package Day06;

import java.util.Arrays;
import java.util.Random;

public class HomeWork {
    public static void main(String[] args) {

        for (int i=0;i<10;i++){
            say();
        }
        int a=3;
        if (a>2){
            say("PQM");
        }
        byte d=13;
        do{
            say("袁晓勿",1000);
            d--;
        }while (d>4);
        System.out.println("1+1的结果不是"+getNum());

        int _1=plus(3,6);

        System.out.println(_1);

        int[] nn=generateArray(10,30,20);
        System.out.println(Arrays.toString(nn));


    }
    public static void work1(){
        int[] array1= new int[10];
        Random _1= new Random();
        int max=0;
        for (int i=0;i< array1.length;i++){
            array1[i]=_1.nextInt(100);
            System.out.print(array1[i]+"、");
            if (array1[i]>max){
                max=array1[i];
            }
        }
        System.out.println();
        System.out.println(max);
        array1= Arrays.copyOf(array1,array1.length+1);
        array1[array1.length-1]=max;
        System.out.println(Arrays.toString(array1));

    }
    public static void say(){
        System.out.println("我爱的就是你!");
    }
    public static void say(String a){
        System.out.println("我爱的就是"+a);
    }
    public static void say(String a,int b){
        System.out.println("我爱的是"+a+"爱你"+b+"年");
    }
    public static double getNum(){
        double a=35.55;
        double b=637.12;
        double c=(float)(b+a);
        return c;

    }
    public static byte plus(int a,int q){
        byte c=(byte)(a-q);
        return c;
    }
    public static int[] generateArray(int a,int max,int min){
        Random so=new Random();
        int[] array=new int[a];
        for (int l=0;l<array.length;l++){
            array[l]= so.nextInt(max)+min;
        }
        return array;
    }





}
